| 1.1 Given that HourlyEmployee and SalariedEmployee are subclasses of FullTimeEmployee, suppose we have: FullTimeEmployee full = new FullTimeEmployee(); HourlyEmployee hourly = new HourlyEmployee (); SalariedEmployee salaried = new SalariedEmployee (); full = salaried; Which one of the following assignments would be legal both at compile-time and at run-time? a. salaried = (SalariedEmploye e) full; b. salaried = full; c. salaried = (FullTimeEmploye e) full; d. hourly = (HourlyEmploye e) full; Create a small project to validate your claim. | |
| View Solution | |
| Next >> | |